a=[0 1 -1 1 0 0 0 0 0 0;0 0 0 1 1 0 0 0 0 0;0 0 0 0 0 -1 1 0 0 0;
   1 1 0 0 0 0 0 0 0 0;1 0 0 0 1 0 0 0 0 0;0 0 0 0 0 0 1 1 0 0;
   0 0 0 0 0 0 0 0 1 0;0 0 0 0 0 0 0 0 -1 1;0 0 0 0 0 0 0 0 0 1;
   0 0 1 0 0 1 0 1 0 0];
%a=[1 2 4 1 7;2 3 0 1 8;4 1 7 6 1;1 1 0 2 1;1 3 0 1 1]
%b=[15 14 19 5 6]'
b=[300 500 200 800 800 1000 400 200 600 1000]';
%n=5;
n=10;
[A,x]=gauss1(r,n);
disp('the solution of the equations:');
A
x